package com.wish233.retry;

import com.wish233.retry.impl.NoRetryStrategy;
import com.wish233.serializer.JdkSerializer;
import com.wish233.serializer.Serializer;
import com.wish233.spi.SpiLoader;

/**
 * @author WHH
 */
public class RetryStrategyFactory {

    /**
     * 默认重试机制
     */
    private static final RetryStrategy DEFAULT_RETRY_STRATEGY = new NoRetryStrategy();

    static {
        SpiLoader.load(RetryStrategy.class);
    }

    public static RetryStrategy getInstance(String key) {
        return SpiLoader.getSpiInstance(RetryStrategy.class, key);
    }

}
